/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exceptions;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 *
 * @author Sebastian
 */
public class TrackException extends Exception {
    
    public static final String EMPTY_DATE = "dateempty"; //key for resource bundle
    
    public TrackException(String message) {
	super(message);
    }
    
    public String getMessage() {
        return getLocalizedMessage();
    }

    @Override
    public String getLocalizedMessage() {
        try {
            return ResourceBundle.getBundle("gui/guilabels").getString(super.getMessage());
        }
        catch (MissingResourceException e) {
            return super.getMessage();
        }
    }
    
}
